/**
 * @mbggenerated
 * @author wujian
 */
package bearworker.zxl.dao.mapper;

import bearworker.zxl.entity.DeliveryLogisticsInformation;
import org.apache.ibatis.jdbc.SQL;

public class DeliveryLogisticsInformationSqlProvider {

    /* @mbggenerated */
    public String insertSelective(DeliveryLogisticsInformation record) {
        return new SQL() {{
            INSERT_INTO("delivery_logistics_information");

            if (record.getId() != null) {
                VALUES("id", "#{id,jdbcType=INTEGER}");
            }

            if (record.getCourierNumber() != null) {
                VALUES("courier_number", "#{courierNumber,jdbcType=VARCHAR}");
            }

            if (record.getState() != null) {
                VALUES("state", "#{state,jdbcType=VARCHAR}");
            }

            if (record.getStateDetail() != null) {
                VALUES("state_detail", "#{stateDetail,jdbcType=VARCHAR}");
            }

            if (record.getStateTime() != null) {
                VALUES("state_time", "#{stateTime,jdbcType=TIMESTAMP}");
            }

            if (record.getCreateTime() != null) {
                VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
            }

        }}.toString();
    }

    /* @mbggenerated */
    public String updateByPrimaryKeySelective(DeliveryLogisticsInformation record) {
        return new SQL() {{
            UPDATE("delivery_logistics_information");

            if (record.getCourierNumber() != null) {
                SET("courier_number = #{courierNumber,jdbcType=VARCHAR}");
            }

            if (record.getState() != null) {
                SET("state = #{state,jdbcType=VARCHAR}");
            }

            if (record.getStateDetail() != null) {
                SET("state_detail = #{stateDetail,jdbcType=VARCHAR}");
            }

            if (record.getStateTime() != null) {
                SET("state_time = #{stateTime,jdbcType=TIMESTAMP}");
            }

            if (record.getCreateTime() != null) {
                SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
            }

            WHERE("id = #{id,jdbcType=INTEGER}");

        }}.toString();
    }
}